#ai.exe : test_bigint.cpp bigint.o func.o
#	g++ test_bigint.cpp bigint.o func.o

#ar.exe : test_bigreal.cpp bigint.o bigreal.o func.o utility.o
#	g++ test_bigreal.cpp bigint.o bigreal.o func.o utility.o

SRCDIR := ./src
BLDDIR := ./include
INCLUDES := -I$(BLDDIR)


a.exe : $(SRCDIR)/test_bigreal.cpp libbignumber.a
	g++ $(INCLUDES) $(SRCDIR)/test_bigreal.cpp libbignumber.a

libbignumber.a : bigint.o bigreal.o func.o utility.o
	ar -r libbignumber.a bigint.o bigreal.o func.o utility.o
	rm *.o

bigint.o : $(SRCDIR)/bigint.cpp $(BLDDIR)/bigint.h
	g++ $(INCLUDES) -c $(SRCDIR)/bigint.cpp

bigreal.o : $(SRCDIR)/bigreal.cpp $(BLDDIR)/bigreal.h
	g++ $(INCLUDES) -c $(SRCDIR)/bigreal.cpp

func.o : $(SRCDIR)/func.cpp $(BLDDIR)/func.h
	g++ $(INCLUDES) -c $(SRCDIR)/func.cpp

utility.o : $(SRCDIR)/utility.cpp $(BLDDIR)/utility.h
	g++ $(INCLUDES) -c $(SRCDIR)/utility.cpp
